<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      * {
        padding: 0;
        margin: 0;
        box-sizing: border-box;
      }

      #app {
        width: 100px;
        height: 100px;
        background: red;
      }

      ul li {
        width: 10px;
        height: 10px;
        background: blueviolet;
      }
    </style>
  </head>
  <body>
    <div id="app">
      <ul>
        <li class="li"></li>
      </ul>
    </div>
    <script>
      document.querySelector('#app').addEventListener('click', function (e) {
        console.log(e.target);
        add(e);
      });

      function add(e) {
        console.log(e.target);
        console.log(abc);
      }
    </script>
  </body>
</html>
